package route.planner;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;

public class RoutePlannerActivity extends Activity implements OnClickListener {

	ImageButton buttSearchPlaces, buttHistory, buttCamera;
	TextView tvSearchPlaces, tvHistory, tvCamera;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		Initialize();

	}
	
	
	public void Initialize() {
		tvSearchPlaces=(TextView)findViewById(R.id.tvSearchPlaces);
		tvHistory=(TextView)findViewById(R.id.tvHistory);
		tvCamera=(TextView)findViewById(R.id.tvCamera);
		buttSearchPlaces=(ImageButton)findViewById(R.id.buttSearchPlaces);
		buttHistory=(ImageButton)findViewById(R.id.buttHistory);
		buttCamera=(ImageButton)findViewById(R.id.buttCamera);
		buttSearchPlaces.setOnClickListener(this);
		buttHistory.setOnClickListener(this);
		buttCamera.setOnClickListener(this);
		
		
	}
	

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch(v.getId()){
		case R.id.buttSearchPlaces:
			Intent findPlaces = new Intent(RoutePlannerActivity.this,FindPlacesActivity.class);
			startActivity(findPlaces);
			break;
		
		case R.id.buttHistory:
			Intent history = new Intent(RoutePlannerActivity.this,HistoryActivity.class);
			startActivity(history);
			break;
		case R.id.buttCamera:
			
			break;
		}
	}
	
}